﻿@model IEnumerable<Developer.Entity.FeedBack>
@{
    Layout = null;
}

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="~/Content/UI/css/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/UI/css/mdui.min.css" />
    <style>
        h5 {
            margin-bottom: 10px;
        }

        img {
            width: 50%;
            float: left;
        }

        .detail {
            width: 45%;
            float: left;
            margin-left: 5%;
        }
    </style>
</head>

<body>
    <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title">问题反馈</h1>
    </header>

    <div class="mui-content">
        <form action="/account/feedback" method="post">
            <div class="mui-input-row" style="margin: 15px 5px;">
                <textarea id="textarea" placeholder="此处填写反馈内容" rows="6" name="content"></textarea>
                <input name="uid" type="hidden" value="" id="uid"/>
                <button class="mdui-btn mdui-btn-icon mdui-color-theme-accent mdui-ripple mdui-btn-raised" style="float: right;margin-bottom: 2px;" type="submit"><i class="mdui-icon material-icons">&#xe145;</i></button>
            </div>

        </form>

        @{if (Model.Count() > 0)
            {

                <ul class="mui-table-view">
                    @foreach (var item in Model.OrderBy(a => a.State))
                {
                        <li class="mui-table-view-cell mui-collapse">
                            <a class="mui-navigate-right" href="#">@item.CreateTime</a>
                            <div class="mui-collapse-content">
                                <!--页眉，放置标题-->
                                <div class="mui-card-header" style="color: red;">@(item.State == 0 ? "未读" : "已读")</div>
                                <!--内容区-->
                                <div class="mui-card-content" style="margin-bottom:30px;">@(item.ReContent == null ? "( 暂未回复 )" : item.ReContent)</div>
                                <!--页脚，放置补充信息或支持的操作-->
                                <div class="mui-card-footer" style="color: lightgray;">原文：「@item.Content」</div>
                            </div>
                        </li>
                    }


                </ul>
            }
        }
    </div>

    <script src="~/Content/UI/js/mui.min.js"></script>
    <script type="text/javascript" src="~/Content/UI/js/mdui.min.js"></script>
    <script src="~/Content/scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript">
        mui.init()
        $(document).ready(function () {
            var uid = localStorage.user;
            $('#uid').val(uid);
        });
        
    </script>
</body>

</html>
